<template>
<CategorySelector :disabled="isShow !== 1" ></CategorySelector>
  <SpuListVue v-if="isShow === 1" @setIsShow="isShow = $event" @setSpu="spu = $event"></SpuListVue>
  <SaveOrUpdateList v-else-if="isShow === 2" @setIsShow="isShow = $event" :spu="spu" ></SaveOrUpdateList>
  <SaveSku v-else @setIsShow="isShow = $event" :spu="spu" ></SaveSku>
</template>

<script lang="ts">
export default {
  name: "XSpu",
};
</script>

<script lang="ts" setup>
import CategorySelector from "@/components/CategorySelector/index.vue";
import SpuListVue from "./components/SpuList.vue";
import SaveOrUpdateList from "./components/SaveOrUpdateSpu.vue";
import  SaveSku from "./components/SaveSku.vue"
import { ref } from "vue";
const isShow = ref(1)
const spu = ref({
  spuName: "",
  tmId: undefined,
  description: "",
  spuImageList: [],
  spuSaleAttrList: [],
});
</script>

<style scoped></style>